    //
//  ArmGroups+ArmGroups.m
//  ClinicalCollections
//
//  Created by janakiraman gopinath on 5/18/13.
//  Copyright (c) 2013 GOPI. All rights reserved.
//

#import "ArmGroups+ArmGroups.h"

@implementation ArmGroups (ArmGroups)


+ (void) armGroups:(NSArray *) armGroups
        forContext:(NSManagedObjectContext *)context
forClinicalTrialGov:(ClinicalTrialGov *)clinicalTrialGov
{
    for (NSDictionary *armGroupDict in armGroups) {
        ArmGroups  *armGroup = (ArmGroups *)[NSEntityDescription insertNewObjectForEntityForName:@"ArmGroups"
                                                                           inManagedObjectContext:context];
        
        if (!([[armGroupDict valueForKey:@"description"] isEqual:[NSNull null]]))
            armGroup.desc = [armGroupDict valueForKey:@"description"];
               
        armGroup.arm_group_label = [armGroupDict valueForKey:@"arm_group_label"];
        if (!([[armGroupDict valueForKey:@"arm_group_type"] isEqual:[NSNull null]]))
            armGroup.arm_group_type = [armGroupDict valueForKey:@"arm_group_type"];
        armGroup.clinicalTrialGov = clinicalTrialGov;
    }
    return;
}
@end
